package com.ziyun.pop.modules.logistics.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ziyun.pop.modules.logistics.dao.LogisticsTypeDao;
import com.ziyun.pop.modules.logistics.entity.LogisticsTypeEntity;
import com.ziyun.pop.modules.logistics.service.LogisticsTypeService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;



@Service("logisticsTypeService")
public class LogisticsTypeServiceImpl extends ServiceImpl<LogisticsTypeDao, LogisticsTypeEntity> implements LogisticsTypeService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<LogisticsTypeEntity> page = (Page<LogisticsTypeEntity>) this.page(
                new Query<LogisticsTypeEntity>(params).getPage(),
                new QueryWrapper<LogisticsTypeEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<Map<Integer, String>> queryTypeList() {
        return this.baseMapper.queryTypeList();
    }

}
